Search Commands

Monday, February 20, 2023

7:33 AM

Search and Replace

Default shortcut is Ctrl + H

Searches the current page for the specified phrase and replaces it with a new phrase. Use standard Regular Expression syntax for advanced searches; substitution parameters can be used to inject regular expression captures.

 

Warning

A reqgular expression with non-greedy syntax could corrupt, delete parts, or erase all content on a page. Be sure to test your regular expression on a single page before targeting a section or notebook.

 

This searches line-by-line so it will not find text that spans paragraphs or table cells. If the text cursor is currently within a word, that word is shown as the default text to replace in the Find what field.

 

 

If the Replace with text contains the sequence \n then that is replaced with a Newline character. For example, replacing text with "one\ntwo" will result in two lines as follows:

 

one
two

 

Due to the way regular expressions are interpreted, if you want to replace 12:33:47 with 12:33 then use a regular expression like ((\d{2}:\d{2}):\d{2}) and replace with $2. If you exclude the outer parenthesis and replace with $1, the result will be no change.

 

Search and Copy/Move

Default shortcut is Alt + F

Searches for keywords across pages and copies or moves selected pages (Alt + F) to another section

 

 

Next Unread Page

Starting from the current page, find the next unread page across all notebooks and navigate to that page.

 

Previous Unread Page

Starting from the current page, find the previous unread page across all notebooks and navigate to that page.

 

 

#omwiki #omcommands

 

© 2020 Steven M Cohn. All rights reserved.

Please consider a sponsorship or one-time donation to support ongoing development

 

Created with OneNote.